function del_collect(a) {
    if (!confirm("确定删除此条信息吗?")) return !1;
    if (!a) return alert("参数获取失败,请联系管理员!"), !1;
    $.ajax({
        "type": "GET",
        "url": "/wp-content/plugins/uhome/ajax.php",
        "data": "del_collect_id=" + a,
        "success": function(b) {
            document.location.reload();
        }
    });
}

function showinitBox() {
    $("#lianHe_div").css("display", "block");
}

function sinaconnect(b) {
    if ($("#connect_checkbox").attr("checked") == "checked") var a = "yes"; else var a = "no";
    $.ajax({
        "type": "GET",
        "url": "/respond.php?act=comment_connect&comment_connect=" + a,
        "dataType": "json",
        "success": function(c) {}
    });
}

function lianHe_hide() {
    $("#lianHe_div").css("display", "none");
}

function checkuser_login(a, b) {
    a == "" ? $("#user_login_msg").html("请输入用户名") : $.ajax({
        "type": "POST",
        "url": b,
        "data": "action=checkuserlogin&user_login=" + a,
        "dataType": "json",
        "success": function(c) {
            c.error ? $("#user_login_msg").html(c.message) : $("#user_login_msg").html("<img src='/wp-content/plugins/uhome/images/tick_circle.png'/>");
        }
    });
}

function checkpass1(a) {
    a = $.trim(a), a == "" ? $("#pass1_msg").html("密码不能为空") : a.length < 6 ? $("#pass1_msg").html("密码不能小于六位") : $("#pass1_msg").html("<img src='/wp-content/plugins/uhome/images/tick_circle.png'/>");
}

function checkpass2(a) {
    a = $.trim(a);
    var b = $.trim($("#pass1").val());
    a == "" ? $("#pass2_msg").html("确认密码不能为空") : b != a ? $("#pass2_msg").html("两次密码不一致") : $("#pass2_msg").html("<img src='/wp-content/plugins/uhome/images/tick_circle.png'/>");
}

function checkform(e) {
    var a = $.trim($("#user_login").val()), d = $.trim($("#pass1").val()), c = $.trim($("#pass2").val()), b = !0;
    d == "" ? ($("#pass1_msg").html("密码不能为空"), b = !1) : d.length < 6 && ($("#pass1_msg").html("密码不能小于六位"), b = !1), c == "" ? ($("#pass2_msg").html("确认密码不能为空"), b = !1) : d != c && ($("#pass2_msg").html("两次密码不一致"), b = !1), a == "" ? ($("#user_login_msg").html("请输入用户名"), b = !1) : $.ajax({
        "type": "POST",
        "url": e,
        "data": "action=checkuserlogin&user_login=" + a,
        "dataType": "json",
        "success": function(f) {
            f.error ? ($("#user_login_msg").html(f.message), b = !1) : b && document.getElementById("form1").submit();
        }
    });
}

function checkaddress(b) {
    var a = !0;
    b.name.value == "" ? ($("#namemsg").html("收货人姓名不能为空"), a = !1) : $("#namemsg").html(""), b.address.value == "" ? ($("#addressmsg").html("收货人地址不能为空"), a = !1) : $("#addressmsg").html("");
    var c = /^[1-9][0-9]{5}$/;
    b.zipcode.value == "" ? ($("#zipcodemsg").html("邮编不能为空"), a = !1) : c.test(b.zipcode.value) ? $("#zipcodemsg").html("") : ($("#zipcodemsg").html("邮编格式不正确"), a = !1);
    var d = /^[0-9+][0-9-]+$/;
    return b.telephone.value == "" ? ($("#telephonemsg").html("联系电话不能为空"), a = !1) : d.test(b.telephone.value) ? $("#telephonemsg").html("") : ($("#telephonemsg").html("电话号码格式不正确!"), a = !1), !a && $("#update_success") && $("#update_success").html(""), a;
}

function setIsUsed(a, b, c) {
    return $.ajax({
        "type": "GET",
        "url": c,
        "data": "action=update_used&coupon_id=" + a + "&log_id=" + b,
        "success": function(d) {
            d == "Y" ? ($("#is_used_" + b).parent().css("display", "none"), $("#is_used_" + b).parent().parent().parent().parent().removeClass().addClass("perMyCouponBox couponOver")) : d == "W" ? alert("参数获取失败，请刷新重试！") : d == "N" && alert("设置失败，请刷新重试！");
        }
    }), !1;
}

function confirm_product(c, b) {
    var a = confirm("确认收到礼品了吗?");
    a && jQuery.ajax({
        "type": "GET",
        "url": b,
        "data": "action=confirm_product&confirm_id=" + c,
        "success": function(d) {
            d == "y" ? (alert("确认成功!"), window.location.reload()) : alert("确认失败!");
        }
    });
}

function del_fx_love(a) {
    if (!confirm("确定删除此条信息吗?")) return !1;
    if (!a) return alert("参数获取失败,请联系管理员!"), !1;
    $.ajax({
        "type": "GET",
        "url": "/wp-content/plugins/uhome/ajax.php",
        "data": "del_love_id=" + a,
        "success": function(b) {
            del_love_cookie("lid_" + a, "/"), document.location.reload();
        }
    });
}

function del_order_love(a) {
    if (!confirm("确定删除此条信息吗?")) return !1;
    if (!a) return alert("参数获取失败,请联系管理员!"), !1;
    $.ajax({
        "type": "GET",
        "url": "/wp-content/plugins/uhome/ajax.php",
        "data": "del_order_id=" + a,
        "success": function(b) {
            document.location.reload();
        }
    });
}

function del_exp_love(a) {
    if (!confirm("确定删除此条信息吗?")) return !1;
    if (!a) return alert("参数获取失败,请联系管理员!"), !1;
    $.ajax({
        "type": "GET",
        "url": "/wp-content/plugins/uhome/ajax.php",
        "data": "del_exp_id=" + a,
        "success": function(b) {
            $.getJSON(experience_domain + "wp-content/plugins/wp_experience/del_exp.php?exp_id=" + a + "&jsoncallback=?", function(c) {
                document.location.reload();
            });
        }
    });
}

function del_love_cookie(a, c) {
    var d = new Date;
    d.setTime(d.getTime() - 3600);
    var b = a + "=0;path=" + c + ";expires=" + d.toGMTString();
    b += ";domain=.zdmya.com", document.cookie = b;
}

function info_inner_avatar_img() {
    window.onload = function() {
        var c = $(".infoInnerAvatar img").attr("src");
        $(".infoInnerAvatar img").attr({
            "src": c + "?rand=" + Math.random()
        });
        var b = $("#user-avatar-display-image img").attr("src");
        $("#user-avatar-display-image img").attr({
            "src": b + "?rand=" + Math.random()
        });
        var a = $(".infoAvatar img").attr("src");
        $(".infoAvatar img").attr({
            "src": a + "?rand=" + Math.random()
        });
    };
}

function info_avatar_img() {
    var a = $(".infoAvatar img").attr("src");
    $(".infoAvatar img").attr({
        "src": a + "?rand=" + Math.random()
    });
}

function chbk(a) {
    a.className = "bbdab";
}

function chbkb(a) {
    a.className = "bbda";
}

function user_bind(a) {
    var b = $("#wrapOut");
    b.css("display", "block"), b.find(".couponShowBox").html("您已绑定，您的用户名是：" + a);
}